<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    {css href="__CSS__/bootstrap.min.css"}
    {css href="__CSS__/style.css"}
    {js href="__JS__/jquery-3.3.1.min.js"}
    {js href="__JS__/bootstrap.bundle.min.js"}
</head>
<body>
<div class="container pt-5 mt-5">
    <div class="row align-items-center">
        <div class="col-3 sidebar">
            <button class="btn btn-secondary">
                作者管理
            </button>
        </div>
        <div class="col-9 main">
            <form action="{:url('/user')}" class="pb-3">
                <div class="form-row">
                    <div class="col-form-label">
                        <label for="authorname">作者名</label>
                    </div>
                    <div>
                        <input type="text" name="authorname" id="authorname" class="form-control">
                    </div>
                    <div class="col-form-label" >
                        <label for="country">国家</label>
                    </div>
                    <div>
                        <input name="country" id="country" type="text" class="form-control">
                    </div>
                    <div class="col-form-label">
                        <label for="kind">类型</label>
                    </div>
                    <div>
                        <input name="kind" id="kind" type="text" class="form-control">
                    </div>
                    <div>
                        <button class="btn btn-primary">搜索</button>
                        <a href="{:url('/user/add')}" class="btn btn-success">添加用户</a>
                    </div>
                </div>
            </form>
            <table class="table table-bordered">
                <thead class="thead-light">
                <tr>
                    <th class="text-center">ID</th>
                    <th class="text-center">国家</th>
                    <th class="text-center">姓名</th>
                    <th class="text-center">类型</th>
                    <th class="text-center">操作</th>
                </tr>
                </thead>
                <tbody>
                {assign name="empty" value='<tr><td colspan="7" class="text-center text-muted">没有数据</td></tr>'}
                {volist name="list" id="obj" empty="$empty"}
                <tr>
                    <td class="text-center">{$obj.id}</td>
                    <td>{$obj.country}</td>
                    <td class="text-center">{$obj.authorname}</td>
                    <td>{$obj->profile->cat_name}</td>
                    <td class="text-center">
                        <button class="btn btn-danger btn-sm">删除</button>
                        <button class="btn btn-warning btn-sm">修改</button>
                    </td>
                </tr>
                {/volist}
                </tbody>


            </table>
            {$list|raw}
        </div>
    </div>
</div>
</body>
</html>